package com.grantheath.erebus.controller.initializationCommands 
{
	import com.grantheath.erebus.model.enum.names.ErebusProxyNames;
	import com.grantheath.erebus.model.interfaces.IErebusClassReferenceProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 * @author grantheath
	 */
	public class ErebusInitializeAppStageCommand extends SimpleCommand implements ICommand 
	{
		override public function execute(notification : INotification) : void
		{
			var classReferenceProxy : IErebusClassReferenceProxy = facade.retrieveProxy(ErebusProxyNames.CLASS_REFERENCE_PROXY) as IErebusClassReferenceProxy;
			var appStageMediatorClass : Class = classReferenceProxy.appStageMediatorClass;
			
			facade.registerMediator(new appStageMediatorClass(classReferenceProxy.appStage));
		}
	}
}
